<template>
    <div class='div_box'>
        <el-dialog title="告警回放" :visible.sync="dialogPlayback" v-if="dialogPlayback" width="1200px" height="600px" top="8vh"
             @close="cancelAddDia"  :modal-append-to-body="false" :close-on-click-modal="false" :modal="true">

            <div class='alarmPlay'>
                <div v-for="(item, index) in alarmPlayList" :key="index">
                    <div>
                        设备编码:
                        {{ item.imei }}
                    </div>
                    <video controls :src="item.url"></video>
                </div>
            </div>

        </el-dialog>

    </div>
</template>

<script>
export default {
    props: ['alarmPlayList'],
    components: {
    },
    data() {
        return {
            dialogPlayback: false,
        }
    },
    computed: {
    },
    watch: {
    },
    methods: {
        cancelAddDia() {

        }
    },
    created() {

    },
    mounted() {

    }
}
</script>

<style lang='less' scoped>
.div_box {
    // height: 79vh;
    // height: calc(100vh - 122px);
    overflow: auto;
    width: 100%;

    .alarmPlay {
        overflow: auto;
        width: 100%;
        min-height: 55vh;
        display: flex;
        flex-wrap: wrap;

        >div {
            width: 33%;
            padding: 10px;
            box-sizing: border-box;

            >div:first-of-type {
                color: @primaryThemeTxtColor2;
                margin-bottom: 10px;
                display: flex;
                align-items: center;
                justify-content: center;
            }

            video {
                width: 100%;
                height: auto;
            }
        }
    }

}

::v-deep .video-player {
    // width: 100vw !important;
    width: 100% !important;
}

.video-ctrl-box {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: #93B1FF;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);

    .ctrl-circle {
        position: absolute;
        width: 70px;
        height: 70px;
        background: #506AB8;
        border-radius: 50%;
        left: 50%;
        top: 50%;
        transform: translateY(-50%) translateX(-50%);
        display: flex;
        justify-content: center;
        align-items: center;
        color: #F1F1F1;
    }

    i {
        cursor: pointer;
        position: absolute;
        color: #072069;

        &:active {
            color: #409EFF;
        }
    }

    .el-icon-caret-left {
        top: 47%;
        left: 27px;
        transform: translateX(-50%) scale(1.5);
    }

    .el-icon-caret-right {
        top: 48%;
        right: 11px;
        transform: translateX(-50%) scale(1.5);
    }

    .el-icon-caret-top {
        left: 50%;
        transform: translateX(-50%) translateY(17px) scale(1.5);
    }

    .el-icon-caret-bottom {
        left: 50%;
        bottom: 35px;
        transform: translateX(-50%) translateY(16px) scale(1.5);
    }
}

::v-deep .el-dialog__header {
    display: block !important;
    background: #354895;
    border-bottom: 1px solid #06B1E7;

    .el-dialog__title {
        color: #F1F1F1;
    }
}

::v-deep .el-dialog__headerbtn .el-dialog__close {
    color: #f1f1f1;
    font-size: 20px;
}

::v-deep .el-dialog__body {
    background: #384E91 !important;
    color: #F1F1F1;
    min-height: 552px;
    overflow-y: auto;
    padding: 20px !important;
}

// ::v-deep .el-dialog {
//     border: 2px solid #06B1E7;
//     box-shadow: 0px 0px 10px #06B1E7;
// }
</style>